{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<!--数据列表页面-->
<section class="content">

    <!--顶部搜索筛选-->
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-body">
                    <form class="form-inline searchForm" id="searchForm" action="{:url('index')}" method="GET">

                        <div class="form-group">
                            <input value="{$member_id ? $member_id : '' ;}"
                                   name="member_id" id="member_id" class="form-control input-sm"
                                   placeholder="用户融云ID搜索">
                        </div>
                        <div class="form-group">
                            <input value="{$me_uid ? $me_uid : '' ;}"
                                   name="me_uid" id="me_uid" class="form-control input-sm"
                                   placeholder="用户UID搜索">
                        </div>
<!--                        <div class="form-group">-->
<!--                            <input value="{$me_phone ? $me_phone : '' ;}"-->
<!--                                   name="me_phone" id="me_phone" class="form-control input-sm"-->
<!--                                   placeholder="用户手机号搜索">-->
<!--                        </div>-->
                        <div class="form-group">
                            <input value="{$me_nick_name ? $me_nick_name : '' ;}"
                                   name="me_nick_name" id="me_nick_name" class="form-control input-sm"
                                   placeholder="用户昵称搜索">
                        </div>


                        <div class="form-group">
                            <select name="me_czlwysp_rewards" id="me_czlwysp_rewards" class="form-control input-sm index-search">
                                <option value="">-奖励开关-</option>
                                <option value="0"{if isset($me_czlwysp_rewards) && $me_czlwysp_rewards=='0'}selected{/if}>已关闭</option>
                                <option value="1"{if isset($me_czlwysp_rewards) && $me_czlwysp_rewards=='1'}selected{/if}>已开启</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <input value="{$fmember_id ? $fmember_id : '' ;}"
                                   name="fmember_id" id="fmember_id" class="form-control input-sm"
                                   placeholder="上级融云ID搜索">
                        </div>
                        <div class="form-group">
                            <input value="{$fme_uid ? $fme_uid : '' ;}"
                                   name="fme_uid" id="fme_uid" class="form-control input-sm"
                                   placeholder="上级UID搜索">
                        </div>
                        <div class="form-group">
                            <input value="{$fme_nick_name ? $fme_nick_name : '' ;}"
                                   name="fme_nick_name" id="fme_nick_name" class="form-control input-sm"
                                   placeholder="上级昵称搜索">
                        </div>

                        <div class="form-group">
                            <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
                            </button>
                        </div>

                        <div class="form-group">
                            <button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
                                    class="fa  fa-eraser"></i> 清空查询
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="box">

                <!--数据列表顶部-->
                <div class="box-header">
                    <div>
                        <a class="btn btn-success btn-sm AjaxButton" data-toggle="tooltip" title="【开启奖励】选中数据（注意：控制的是 绿色 和 蓝色 ！！！）"
                           data-confirm-title="批量开启奖励前确认" data-confirm-content="您确定要【开启奖励】选中的数据吗？" data-id="checked"
                           data-url="{:url('plenable')}">
                            <i class="fa fa-check"></i> 批量开启奖励
                        </a>
                        <a class="btn btn-warning btn-sm AjaxButton" data-toggle="tooltip" title="【关闭奖励】选中数据（注意：控制的是 绿色 和 蓝色 ！！！）"
                           data-confirm-title="批量关闭奖励前确认" data-confirm-content="您确定要【关闭奖励】选中的数据吗？" data-id="checked"
                           data-url="{:url('pldisable')}">
                            <i class="fa fa-times"></i> 批量关闭奖励
                        </a>
                        <a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
                            <i class="fa fa-refresh"></i> 刷新
                        </a>
                        <span class="photo-list"><img class="dataListImg" src="https://carmanage.yiyankeji.vip/uploads/moren/frfr.png" style="width: 65px;"></span>
                    </div>
                </div>

                <div class="box-body table-responsive"  style="white-space: nowrap">
                    <table class="table table-hover table-bordered datatable" width="100%">
                        <thead>
                        <tr >
                            <td style="text-align: center;vertical-align: middle;">
                                <input id="dataCheckAll" type="checkbox" onclick="checkAll(this)" class="checkbox"
                                       placeholder="全选/取消">
                            </td>
                            <th style="text-align: center;vertical-align: middle;width: 4.5%">融云ID</th>
                            <th style="text-align: center;vertical-align: middle;width: 4.5%">用户信息</th>
                            <th style="text-align: center;vertical-align: middle;width: 6%">上级信息</th>
<!--                            <th style="text-align: center;vertical-align: middle;;width: 4.5%">手机号</th>-->
<!--                            <th style="text-align: center;vertical-align: middle;;width: 4.5%">昵称</th>-->
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: red">自身获得文字收益</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: red">自身获得音频收益</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: red">自身获得视频收益</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: red">自身获得礼物收益</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">奖励开关</th>
                            <th style="text-align: center;vertical-align: middle;width: 2%">调整奖励比例</th>

                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【超推】获得文字奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【超推】获得语音奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【超推】获得视频奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【超推】获得礼物奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【运营】获得文字奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【运营】获得语音奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【运营】获得视频奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【运营】获得礼物奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【产品】获得文字奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【产品】获得语音奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【产品】获得视频奖励比例</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">身为【产品】获得礼物奖励比例</span></th>

                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【女孩】获得【充值】奖励比例（扫码绑定）</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【女孩】获得【开通VIP】奖励比例（VIP绑定）</span></th>
<!--                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【女孩】获得【充值或开通VIP】奖励比例（扫码绑定）</span></th>-->
<!--                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【女孩】获得【充值或开通VIP】奖励比例（VIP绑定）</span></th>-->
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【超推】获得【开通VIP】奖励比例（扫码绑定）</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【超推】获得【开通VIP】奖励比例（VIP绑定）</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【运营】获得【开通VIP】奖励比例（扫码绑定）</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【运营】获得【开通VIP】奖励比例（VIP绑定）</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【产品】获得【开通VIP】奖励比例（扫码绑定）</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">身为【产品】获得【开通VIP】奖励比例（VIP绑定）</span></th>


                        </tr>
                        </thead>
                        <tbody>
                        {foreach name='data' id='item' key='data_key'}
                        <tr>
                            <td style="text-align: center;vertical-align: middle;">
                                <input type="checkbox" onclick="checkThis(this)" name="data-checkbox"
                                       data-id="{$item.member_id}" class="checkbox data-list-check" value="{$item.member_id}"
                                       placeholder="选择/取消">
                            </td>
                            <td style="text-align: center;vertical-align: middle;">{$item.member_id}</td>
                            <td style="text-align: center;vertical-align: middle;"><span style="color: red">【</span>UID：{$item.me_uid}<span style="color: red">】</span><span style="color: red">【</span>昵称：{$item.me_nick_name}<span style="color: red">】</span></td>

                            {if $item.me_parent==0}
                            <td style="text-align: center;vertical-align: middle;">无上级</td>
                            {else/}
                            <td style="text-align: center;vertical-align: middle;"><span style="color: red">【</span>融云ID：{$item.fmember_id}<span style="color: red">】</span><span style="color: red">【</span>UID：{$item.fme_uid}<span style="color: red">】</span><span style="color: red">【</span>昵称：{$item.fme_nick_name}<span style="color: red">】</span></td>
                            {/if}
<!--                            <td style="text-align: center;vertical-align: middle;">{$item.me_phone}</td>-->
<!--                            <td style="text-align: center;vertical-align: middle;">{$item.me_nick_name}</td>-->
                            <td style="text-align: center;vertical-align: middle;">{$item.zs_lw}%</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.zs_wz}%</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.zs_yp}%</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.zs_sp}%</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_czlwysp_rewards_word}
                                {if $item.me_czlwysp_rewards==1}
                                <a class="btn btn-warning btn-xs AjaxButton" data-toggle="tooltip" title="关闭奖励（注意：控制的是 绿色 和 蓝色 ！！！）"
                                   data-id="{$item.member_id}" data-confirm-title="关闭奖励用户确认"
                                   data-confirm-content='您确定要【关闭奖励】融云ID为 <span class="text-red">{$item.member_id}</span> 的用户吗？'
                                   data-url="{:url('disable')}">
                                    <i class="fa fa-times"></i>
                                </a>
                                {else/}
                                <a class="btn btn-success btn-xs AjaxButton" data-toggle="tooltip" title="开启奖励（注意：控制的是 绿色 和 蓝色 ！！！）"
                                   data-id="{$item.member_id}" data-confirm-title="开启奖励用户确认"
                                   data-confirm-content='您确定要【开启奖励】融云ID为 <span class="text-red">{$item.member_id}</span> 的用户吗？'
                                   data-url="{:url('enable')}">
                                    <i class="fa fa-check"></i>
                                </a>
                                {/if}
                            </td>
                            <td style="text-align: center;vertical-align: middle;">
                                <a data-id="<?php echo htmlentities($item['member_id']); ?>" data-url="allocationratio" data-confirm="2" data-type="2"
                                   class="btn btn-default btn-xs AjaxButton"  title="调整此用户的各种返利比例" data-toggle="tooltip">
                                    <span>调整</span>
                                </a>
                            </td>


                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sj_wz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sj_yp}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sj_sp}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sj_lw}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.ssj_wz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.ssj_yp}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.ssj_sp}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.ssj_lw}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sssj_wz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sssj_yp}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sssj_sp}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 5%"><span style="color: blue">{$item.sssj_lw}%</span></th>

                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.sj_cz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.sj_hbcz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.ssj_cz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.ssj_hbcz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.sssj_cz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.sssj_hbcz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.ssssj_cz}%</span></th>
                            <th style="text-align: center;vertical-align: middle;width: 7%"><span style="color: green">{$item.ssssj_hbcz}%</span></th>


                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>

                <!-- 数据列表底部 -->
                <div class="box-footer">
                    {$page|raw}
                    <label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
                        <small>共{$total}条记录</small>&nbsp;
                        <small>每页显示</small>
                        &nbsp;
                        <select class="input-sm" onchange="changePerPage(this)">
                            <option value="10" {if $admin.per_page==10}selected{/if}>10</option>
                            <option value="20" {if $admin.per_page==20}selected{/if}>20</option>
                            <option value="30" {if $admin.per_page==30}selected{/if}>30</option>
                            <option value="50" {if $admin.per_page==50}selected{/if}>50</option>
                            <option value="100" {if $admin.per_page==100}selected{/if}>100</option>
                        </select>
                        &nbsp;
                        <small>条记录</small>
                    </label>
                </div>

            </div>
        </div>
    </div>
</section>
<script>
    $(function () {
        $('.photo-list img').on('click', function () {
            layer.photos({
                photos: '.photo-list',
                shadeClose: false,
                closeBtn: 2,
                anim: 5
            });
        })
    });
</script>
{/block}

